package vistas.clientes;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import app.Odv;


public class NumeroClienteFrame extends javax.swing.JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JTextField jTextField1;
	private String cuil;

	
	public NumeroClienteFrame(String cuil) {
		super();
		this.cuil = cuil;
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setText("SE HA GUARDADO CORRECTAMENTE");
				jLabel1.setBounds(89, 21, 219, 16);
			}
			{
				jLabel2 = new JLabel();
				getContentPane().add(jLabel2);
				jLabel2.setText("NUMERO DE CLIENTE");
				jLabel2.setBounds(114, 80, 134, 16);
			}
			{
				jTextField1 = new JTextField();
				getContentPane().add(jTextField1);
				jTextField1.setBounds(140, 135, 77, 23);
				
				
				//Odv s= Odv.getinstancia();
				//jTextField1.setText(s.ultimoIdCliente());
				// no se requiere volver a hacer una query para obtener el nuevo cliente dado de alta
				jTextField1.setText(cuil);
				

				jTextField1.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("jTextField1.actionPerformed, event="+evt);
						
						
					}
				});
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
